function HashMap () {
	var names = [];
	var values = [];
	
	this.put = function (key, value) {
		var index = names.indexOf (key);
		if (index < 0) {
			names.push (key);
			values.push (value);
		} else {
			values [index] = value;
		}
	}
	
	this.get = function (key) {
		var index = names.indexOf (key);
		if (index < 0) return null;
		return values [index];
	}
	
	this.keySet = function () {
		return names;
	}
	
	this.values = function () {
		return values;
	}
	
	this.entrySet = function () {
		var set = [];
		for (var i = 0; i < names.length; i ++) 
			set [i] = {key:names [i], value:values [i]};
	}
	
	this.putAll = function (map) {
		var keys = map.keySet ();
		var values = map.values ();
		for (var i = 0; i < keys.length; i ++) {
			var key = keys [i];
			var value = values [i];
			this.put (key, value);
		}
	}
	
	this.clear = function () {
		delete names;
		delete values;
		names = [];
		values = [];
	}
	
	this.size = function () {
		return values.length;
	}
	
	this.containsKey = function (key) {
		return names.indexOf (key) >= 0;
	}
	
	this.containsValue = function (value) {
		return values.indexOf (value) >= 0;
	}
	
	this.isEmpty = function () {
		return values.length == 0;
	}
	
	this.remove = function (key) {
		var index = names.indexOf (key);
		if (index >= 0 && index < names.length) {
			names.removeElement (index);
			values.removeElement (index);
		}
	}
}